/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.File;

/**
 * Classe File
 *
 * Descrição:
 *
 *
 * @author blaster
 */
public class FileD extends File {

    public FileD(String path) {
        super(path);
    }

    public FileD(FileD f, String path) {
        super(f, path);
    }

    public FileD(File f) {
        super(f.getPath());
    }

    @Override
    public String toString() {
        String ret = this.getName();
        if (this.isDirectory()) {
            ret += "/";
        }
        return ret;
    }

    //testar
    public String getExtension() {
        int iponto = 0;
        iponto = this.getName().lastIndexOf(".");
        return this.getName().substring(iponto + 1).toLowerCase();

    }
}
